﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GONES.IBLL;
using GONES.Tools.Common;

public partial class Console_System_DbBackUpList : CPage
{
    public string BackDateString;

    protected void Page_Load(object sender, EventArgs e)
    {
        BindData();
    }

    /// <summary>
    /// 数据绑定，同时需要设置数据总条数
    /// 当前页与每页条数由页面中的pagerForm回传得到
    /// </summary>
    private void BindData()
    {
        BackDateString = Request.Form["txtBackDate"];
        try
        {
            var dbbackManager = AppContext.GetObject("S_DbBackUpManager") as IS_DbBackUpManager;
            IList<DataFilter> dataFilters = new List<DataFilter>();
            if (!string.IsNullOrEmpty(BackDateString))
            {
                DataFilter df = new DataFilter() { Type = "date", Value = BackDateString, Field = "BackUpDate" };
                df.Comparison = "eq";
                dataFilters.Add(df);
            }
            long recordCount = TotalCount;
            RepeaterTr.DataSource = dbbackManager.List(dataFilters, PageNum, NumPerPage, ref recordCount);
            RepeaterTr.DataBind();
            TotalCount = recordCount;
        }
        catch
        {
 
        }
    }
}